/**
 * 
 */
package com.ideal.trsdata.util;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicInteger;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @作者 杨鹏
 * @创建日期 May 25, 2009
 */
public class TrsDataConfig {
	public static final Log log=LogFactory.getLog(TrsDataConfig.class);
	public static Map<String,Object> map=new HashMap<String,Object>();
	public static final String FIRSTHASDEPT="0";   //上下级情况
	public static final String SECONDHASDEPT="2";
	public static final String THRIDHASDEPT="1";
	public static final String FORTHHASDEPT="3";
	
	public static  String ORGFLAG="优先报号|品牌查询|实名查询|临时报号";
	
	
	
	public static final String ORGTYPE="1";
	
	public static final String RECOMMEND_INDUSTRY="";
	
	public static final String RECOMMEND_TEL="";
	
	public static final String PLANT_ID="";
	
	
	public static String PROVCODE=null;
	public static String RECOMMEND_SUB_GROUP="0";
	public static String delStatus="2";
	public static String addStatus="1";
	public static String updateStatus="3";
	
	//产品属性配置
	public static String PropertyTable="S_PRODUCT_PROPERTY";
	
	public static String RANK_STRATEGY="rankStrategy";
	public static String RECOMMENDSPEC="recommendSpecId";
	public static String RANK_POSITION="rankPosition";
	public static String BALANCE_VALUE="balanceValue";
	public static String REALCODE="realNameCode";
	public static String REALCODEFLAG="realNameCode|realNameCode2|realNameCode3";
	public static String TEMPCODE="tempNameCode";
	public static String TEMPCODEFLAG="tempNameCode|tempNameCode2|tempNameCode3";
	public static String REALNAME="realName";
	public static String REALString="'realName','realName2','realName3','realNameCode','realNameCode2','realNameCode3'";
	public static String TEMPString="'tempName','tempName2','tempName3','tempNameCode','tempNameCode2','tempNameCode3'";
	public static String REALNAMEFLAG="realName|realName2|realName3";
	public static String TEMPNAME="tempName";
	public static String TEMPNAMEFLAG="tempName|tempName2|tempName3";
	public static String REALCODE2="realNameCode2";
	public static String TEMPCODE2="tempNameCode2";
	public static String REALNAME2="realName2";
	public static String TEMPNAME2="tempName2";
	public static String REALCODE3="realNameCode3";
	public static String TEMPCODE3="tempNameCode3";
	public static String REALNAME3="realName3";
	public static String TEMPNAME3="tempName3";
	
	public static String CREATE_EMPLID="9999";
	public static String PLANT_CODE="00006";
	
	public static AtomicInteger atomicInt=new AtomicInteger(1);
	public static AtomicInteger atomicThread=new AtomicInteger(0);
	public static Integer ThreadPool=10;
	
	public static Integer PAGESIZE=12;
	public static Long a=System.currentTimeMillis();
	public static Integer b=11;
	
	public static Boolean THREADFLAG=true;
	
	public static Date startTime;
	public static Date endTime;
	
	public static Integer FindFlag=0;
	
	public static Integer HbFindFlag=0; //河北标记
	public static Integer TjFindFlag=0;  //天津标记
	public static Integer SxFindFlag=0;   //山西标记
	public static Integer NmgFindFlag=0;  //内蒙古标记
	public static Integer LnFindFlag=0;  //辽宁标记
	public static Integer JlFindFlag=0;  //吉林标记
	public static Integer HljFindFlag=0; //黑龙江标记
	public static Integer SdFindFlag=0;  //山东标记
	public static Integer HnFindFlag=0;  //河南标记
	
	
	public static Date HbstartTime;
	public static Date HbendTime;
	public static Date TjstartTime;
	public static Date TjendTime;
	public static Date SxstartTime;
	public static Date SxendTime;
	public static Date NmgstartTime;
	public static Date NmgendTime;
	public static Date LnstartTime;
	public static Date LnendTime;
	public static Date HljstartTime;
	public static Date HljendTime;
	public static Date SdstartTime;
	public static Date SdendTime;
	public static Date HnstartTime;
	public static Date HnendTime;
	public static Date JlstartTime;
	public static Date JlendTime;
	
	
	
	
	//如果正常采集需要线程
	public static AtomicInteger IMPORTSTART=new AtomicInteger(1);
	public static Integer IMPORTTHREAD=5;
	public static Boolean IMPORTFLAG=true;
	
	//保密电话标志
	  public static final String TEL_SECRET_FLAG="保密";
	
	  
  
	  
	public void init()throws Exception{
		Properties pro=new Properties();
		InputStream is;
	
		is = new BufferedInputStream(new FileInputStream("./conf/trsData.properties"));
		pro.load(is); 
		
		RECOMMEND_SUB_GROUP=pro.getProperty("RECOMMEND_SUB_GROUP");
		CREATE_EMPLID=pro.getProperty("CREATE_EMPLID");
		PLANT_CODE=pro.getProperty("PLANT_CODE");	
		ORGFLAG=pro.getProperty("ORGFLAG");
		PropertyTable=pro.getProperty("PROPERTYTABLE");
		RANK_STRATEGY=pro.getProperty("RANK_STRATEGY");
		RECOMMENDSPEC=pro.getProperty("RECOMMENDSPEC");
		RANK_POSITION=pro.getProperty("RANK_POSITION");
		BALANCE_VALUE=pro.getProperty("balanceValue");
		ThreadPool=Integer.parseInt(pro.getProperty("THREADPOOL"));
		PROVCODE=pro.getProperty("ProvCode");
		
	}
	
	/**
	 * 
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		try {
			new TrsDataConfig().init();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	

}
